#pragma once

#include <QFrame>
#include <vector>
#include <QMouseEvent>
#include "BondDetailData.h"
class QRect;
class QLabel;
class QHBoxLayout;
class DetailData;

class BondDetailPrcInter : public QFrame
{
public:
    BondDetailPrcInter(QWidget* p = nullptr);
    void setDetailData(QSharedPointer<DetailData> data);

protected:
	void paintEvent(QPaintEvent* event) override;
	void mousePressEvent(QMouseEvent* event) override;
	void mouseMoveEvent(QMouseEvent* event) override;

protected slots:
	void onUpdateUi();

private:
	QSharedPointer<DetailData>		m_data = nullptr;
	QHBoxLayout*	m_interLayout = nullptr;
	std::vector<QRect>	m_rects;
	int				m_hoverIndex = -1;
};
